﻿using Architecture.Domain.Dto.LeaveDto;
using Architecture.Domain.Dto.UserInfoDto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Architecture.Domain.Service.LeaveServices
{
    /// <summary>
    /// 请假服务
    /// </summary>
    public interface ILeaveService
    {
        /// <summary>
        /// 添加请假信息
        /// </summary>
        /// <param name="requestForLeave">请假实体</param>
        /// <returns>返回受影响的行数</returns>
        Task<int> AddLeave(RequestForLeave requestForLeave);

        /// <summary>
        /// 搜索部门信息
        /// </summary>
        /// <param name="userId">角色ID</param>
        /// <returns>返回部门信息</returns>
        Task<List<LeaveSeachDto>> GetLeave(int userId);

        /// <summary>
        /// 反填角色信息
        /// </summary>
        /// <param name="userId">角色ID</param>
        /// <returns>返回角色信息</returns>
        Task<UserInfo> GetModelUserInfo(int userId);

        Task<List<UserInfoDepartmentDto>> GetUserInfoDepartment(int departmentId);

        //Task<List<UserInfoDepartmentDto>> GetUserInfoDepartment();

        Task<LeaveListDto<GetInfoDto>> GetLeaveList(int UserId ,int PageIndex, int PageSize, string? UserName, bool? ToExamine);


        /// <summary>
        /// 反填请假信息
        /// </summary>
        /// <param name="leaveId">请假ID</param>
        /// <returns>反填请假信息</returns>
        Task<RequestForLeave> ReverseLeave(int leaveId);

        Task<int> ToExamineLeave(int leaveId , bool toExamine);

        Task<int> UpdateLeave(RequestForLeave requestForLeave);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="leaveId"></param>
        /// <returns></returns>
        Task<int> DeletedLeave(int leaveId);

    }
}
